{% load i18n %}


<form method="get" action="/results">
  {{env.subdomain_field_html|safe}}
  <input type="hidden" name="role" value="{{params.role}}">
  <input type="hidden" name="small" value="{{params.small}}">
  <input type="hidden" name="style" value="{{params.style}}">
  <table class="query" align="center">
    <tr>
      <td class="instructions" colspan="2">
        {% ifequal params.role 'provide' %}
          <h3 class="sub_title">{% trans "I have information about someone" %}</h3>
          <div class="{{params.error}}">
            {% if env.use_family_name %}
              {% trans "Enter the person's given and family names." %}
            {% else %}
              {% trans "Enter the person's name." %}
            {% endif %}
          </div>
        {% else %}
          <h3 class="sub_title">{% trans "I'm looking for someone" %}</h3>
          <div class="{{params.error}}">
            {% if config.jp_mobile_carrier_redirect %}
              {% trans "Enter the person's name, parts of the name, or mobile phone number." %}
            {% else %}
              {% trans "Enter the person's name or parts of the name." %}
            {% endif %}
          </div>
          {% if config.jp_mobile_carrier_redirect and show_jp_171_suggestion %}
            <div class="error">
              {% blocktrans %}For phones other than mobile phones, please use 171 service provided by NTT.{% endblocktrans %}
            </div>
          {% endif %}
          {% if env.seek_query_form_custom_html %}
            <div class="custom-message">
              {{env.seek_query_form_custom_html|safe}}
            </div>
          {% endif %}
        {% endifequal %}
      </td>
    </tr>

    {% ifequal params.role 'provide' %}
      {% if env.use_family_name and env.family_name_first %}
        <tr>
          <td class="label">
            <label for="last_name">{% trans "Family name" %}:</label>
          </td>
          <td class="field">
            {% ifequal params.style "facebook" %}
              <input id="last_name" name="last_name"
                  value="{{params.last_name}}" size=10>
            {% else %}
              <input id="last_name" name="last_name"
                  value="{{params.last_name}}" size=20>
            {% endifequal %}
          </td>
        </tr>
      {% endif %}
        <tr>
          <td class="label">
            <label for="first_name">
              {% if env.use_family_name %}
                {% trans "Given name" %}:
              {% else %}
                {% trans "Name" %}:
              {% endif %}
            </label>
          </td>
          <td class="field">
            {% ifequal params.style "facebook" %}
              <input id="first_name" name="first_name"
                  value="{{params.first_name}}" size=10>
            {% else %}
            <input id="first_name" name="first_name"
                value="{{params.first_name}}" size=20>
            {% endifequal %}
          </td>
        </tr>
      {% if env.use_family_name and not env.family_name_first %}
        <tr>
          <td class="label">
            <label for="last_name">{% trans "Family name" %}:</label>
          </td>
          <td class="field">
            {% ifequal params.style "facebook" %}
              <input id="last_name" name="last_name"
                  value="{{params.last_name}}" size=10>
            {% else %}
              <input id="last_name" name="last_name"
                  value="{{params.last_name}}" size=20>
            {% endifequal %}
          </td>
        </tr>
      {% endif %}
    {% else %}
      <tr>
        <td class="field">
          {% ifequal params.style "facebook" %}
            <input id="query" name="query"
                value="{{params.query}}" size=10>
          {% else %}
            <input id="query" name="query"
                value="{{params.query}}" size=40>
          {% endifequal %}
        </td>
      </tr>
    {% endifequal %}
    
    <tr>
     {% ifequal num_results 100 %}
      <td class="warning">
        {% trans "More than 100 results; only showing the first 100.  Try entering more of the name" %}
      </td>
     {% endifequal %}
    </tr>
    <tr>
      <td colspan=2 class="submit" align="center">
        {% ifequal params.role 'provide' %}
          <input type="submit" value="{% trans "Provide information about this person" %}">
        {% else %}
          {% ifequal params.style "facebook" %}
            <div style="margin-left: -70px"
            <input type="submit" value="{% trans "Search for this person" %}">
            </div>
          {% else %}
            <input type="submit" value="{% trans "Search for this person" %}">
          {% endifequal %}
        {% endifequal %}
      </td>
    </tr>
  </table>
</form>
